#########################################################################
# File Name: a.py
# Author: luis
# mail: 15088870+liuxing1981@user.noreply.gitee.com
# Created Time: 2025-03-06 22:38
#########################################################################
#!/usr/bin/python
from paddleocr import PaddleOCR
import cv2

# 初始化PaddleOCR
ocr = PaddleOCR(use_angle_cls=True, lang='ch',show_log=False)

# 图片路径
image_path = '/home/luis/Pictures/name_test2.jpg'

# 读取图片
image = cv2.imread(image_path)

# 进行OCR识别
result = ocr.ocr(image_path, cls=True)

# 输出识别结果
for line in result:
    for word_info in line:
        print(f"{word_info[1][0]}")
